Optimal. Leaf size=287 \[ -\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (-\tan (e+f x)+i)}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (\tan (e+f x)+i)}-\frac {-2 B+3 i A}{128 a^3 c^5 f (-\tan (e+f x)+i)^2}+\frac {A+i B}{192 a^3 c^5 f (-\tan (e+f x)+i)^3}-\frac {5 A-i B}{96 a^3 c^5 f (\tan (e+f x)+i)^3}-\frac {B+2 i A}{64 a^3 c^5 f (\tan (e+f x)+i)^4}+\frac {A-i B}{80 a^3 c^5 f (\tan (e+f x)+i)^5}+\frac {7 x (4 A+i B)}{128 a^3 c^5}+\frac {5 i A}{64 a^3 c^5 f (\tan (e+f x)+i)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 287, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 41, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {3588, 77, 203} \[ -\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (-\tan (e+f x)+i)}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (\tan (e+f x)+i)}-\frac {-2 B+3 i A}{128 a^3 c^5 f (-\tan (e+f x)+i)^2}+\frac {A+i B}{192 a^3 c^5 f (-\tan (e+f x)+i)^3}-\frac {5 A-i B}{96 a^3 c^5 f (\tan (e+f x)+i)^3}-\frac {B+2 i A}{64 a^3 c^5 f (\tan (e+f x)+i)^4}+\frac {A-i B}{80 a^3 c^5 f (\tan (e+f x)+i)^5}+\frac {7 x (4 A+i B)}{128 a^3 c^5}+\frac {5 i A}{64 a^3 c^5 f (\tan (e+f x)+i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 77
Rule 203
Rule 3588
Rubi steps
\begin {align*} \int \frac {A+B \tan (e+f x)}{(a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^5} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {A+B x}{(a+i a x)^4 (c-i c x)^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (\frac {A+i B}{64 a^4 c^6 (-i+x)^4}+\frac {i (3 A+2 i B)}{64 a^4 c^6 (-i+x)^3}-\frac {3 (7 A+3 i B)}{256 a^4 c^6 (-i+x)^2}+\frac {-A+i B}{16 a^4 c^6 (i+x)^6}+\frac {2 i A+B}{16 a^4 c^6 (i+x)^5}+\frac {5 A-i B}{32 a^4 c^6 (i+x)^4}-\frac {5 i A}{32 a^4 c^6 (i+x)^3}-\frac {5 (7 A+i B)}{256 a^4 c^6 (i+x)^2}+\frac {7 (4 A+i B)}{128 a^4 c^6 \left (1+x^2\right )}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {A+i B}{192 a^3 c^5 f (i-\tan (e+f x))^3}-\frac {3 i A-2 B}{128 a^3 c^5 f (i-\tan (e+f x))^2}-\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (i-\tan (e+f x))}+\frac {A-i B}{80 a^3 c^5 f (i+\tan (e+f x))^5}-\frac {2 i A+B}{64 a^3 c^5 f (i+\tan (e+f x))^4}-\frac {5 A-i B}{96 a^3 c^5 f (i+\tan (e+f x))^3}+\frac {5 i A}{64 a^3 c^5 f (i+\tan (e+f x))^2}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (i+\tan (e+f x))}+\frac {(7 (4 A+i B)) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (e+f x)\right )}{128 a^3 c^5 f}\\ &=\frac {7 (4 A+i B) x}{128 a^3 c^5}+\frac {A+i B}{192 a^3 c^5 f (i-\tan (e+f x))^3}-\frac {3 i A-2 B}{128 a^3 c^5 f (i-\tan (e+f x))^2}-\frac {3 (7 A+3 i B)}{256 a^3 c^5 f (i-\tan (e+f x))}+\frac {A-i B}{80 a^3 c^5 f (i+\tan (e+f x))^5}-\frac {2 i A+B}{64 a^3 c^5 f (i+\tan (e+f x))^4}-\frac {5 A-i B}{96 a^3 c^5 f (i+\tan (e+f x))^3}+\frac {5 i A}{64 a^3 c^5 f (i+\tan (e+f x))^2}+\frac {5 (7 A+i B)}{256 a^3 c^5 f (i+\tan (e+f x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 4.71, size = 280, normalized size = 0.98 \[ \frac {\sec ^3(e+f x) (\cos (5 (e+f x))+i \sin (5 (e+f x))) (210 (4 A (1+4 i f x)-B (4 f x+i)) \cos (2 (e+f x))-560 (A+i B) \cos (4 (e+f x))+3360 A f x \sin (2 (e+f x))+840 i A \sin (2 (e+f x))+1120 i A \sin (4 (e+f x))+180 i A \sin (6 (e+f x))+16 i A \sin (8 (e+f x))-60 A \cos (6 (e+f x))-4 A \cos (8 (e+f x))+2100 A+210 B \sin (2 (e+f x))+840 i B f x \sin (2 (e+f x))-280 B \sin (4 (e+f x))-45 B \sin (6 (e+f x))-4 B \sin (8 (e+f x))-135 i B \cos (6 (e+f x))-16 i B \cos (8 (e+f x)))}{15360 a^3 c^5 f (\tan (e+f x)-i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 161, normalized size = 0.56 \[ \frac {{\left (840 \, {\left (4 \, A + i \, B\right )} f x e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-6 i \, A - 6 \, B\right )} e^{\left (16 i \, f x + 16 i \, e\right )} + {\left (-60 i \, A - 45 \, B\right )} e^{\left (14 i \, f x + 14 i \, e\right )} + {\left (-280 i \, A - 140 \, B\right )} e^{\left (12 i \, f x + 12 i \, e\right )} + {\left (-840 i \, A - 210 \, B\right )} e^{\left (10 i \, f x + 10 i \, e\right )} - 2100 i \, A e^{\left (8 i \, f x + 8 i \, e\right )} + {\left (840 i \, A - 420 \, B\right )} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (120 i \, A - 90 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + 10 i \, A - 10 \, B\right )} e^{\left (-6 i \, f x - 6 i \, e\right )}}{15360 \, a^{3} c^{5} f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 5.28, size = 291, normalized size = 1.01 \[ -\frac {\frac {60 \, {\left (-28 i \, A + 7 \, B\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a^{3} c^{5}} + \frac {60 \, {\left (28 i \, A - 7 \, B\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{3} c^{5}} + \frac {10 \, {\left (-308 i \, A \tan \left (f x + e\right )^{3} + 77 \, B \tan \left (f x + e\right )^{3} - 1050 \, A \tan \left (f x + e\right )^{2} - 285 i \, B \tan \left (f x + e\right )^{2} + 1212 i \, A \tan \left (f x + e\right ) - 363 \, B \tan \left (f x + e\right ) + 478 \, A + 163 i \, B\right )}}{a^{3} c^{5} {\left (\tan \left (f x + e\right ) - i\right )}^{3}} + \frac {3836 i \, A \tan \left (f x + e\right )^{5} - 959 \, B \tan \left (f x + e\right )^{5} - 21280 \, A \tan \left (f x + e\right )^{4} - 5095 i \, B \tan \left (f x + e\right )^{4} - 47960 i \, A \tan \left (f x + e\right )^{3} + 10790 \, B \tan \left (f x + e\right )^{3} + 55360 \, A \tan \left (f x + e\right )^{2} + 11230 i \, B \tan \left (f x + e\right )^{2} + 33260 i \, A \tan \left (f x + e\right ) - 5435 \, B \tan \left (f x + e\right ) - 8608 \, A - 667 i \, B}{a^{3} c^{5} {\left (\tan \left (f x + e\right ) + i\right )}^{5}}}{15360 \, f} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.47, size = 445, normalized size = 1.55 \[ -\frac {i B}{80 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )^{5}}+\frac {A}{80 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )^{5}}+\frac {i B}{96 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )^{3}}-\frac {5 A}{96 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )^{3}}+\frac {9 i B}{256 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )-i\right )}+\frac {35 A}{256 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )}-\frac {7 i \ln \left (\tan \left (f x +e \right )-i\right ) A}{64 f \,a^{3} c^{5}}-\frac {B}{64 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )^{4}}-\frac {3 i A}{128 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {7 \ln \left (\tan \left (f x +e \right )+i\right ) B}{256 f \,a^{3} c^{5}}+\frac {5 i A}{64 a^{3} c^{5} f \left (\tan \left (f x +e \right )+i\right )^{2}}-\frac {A}{192 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )-i\right )^{3}}+\frac {7 i \ln \left (\tan \left (f x +e \right )+i\right ) A}{64 f \,a^{3} c^{5}}+\frac {7 \ln \left (\tan \left (f x +e \right )-i\right ) B}{256 f \,a^{3} c^{5}}-\frac {i A}{32 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )^{4}}+\frac {21 A}{256 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )-i\right )}+\frac {5 i B}{256 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )+i\right )}+\frac {B}{64 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {i B}{192 f \,a^{3} c^{5} \left (\tan \left (f x +e \right )-i\right )^{3}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: RuntimeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 10.73, size = 319, normalized size = 1.11 \[ \frac {\frac {3\,B}{40\,a^3\,c^5}+{\mathrm {tan}\left (e+f\,x\right )}^4\,\left (-\frac {7\,B}{24\,a^3\,c^5}+\frac {A\,7{}\mathrm {i}}{6\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^6\,\left (-\frac {7\,B}{64\,a^3\,c^5}+\frac {A\,7{}\mathrm {i}}{16\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^7\,\left (\frac {7\,A}{32\,a^3\,c^5}+\frac {B\,7{}\mathrm {i}}{128\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^5\,\left (\frac {35\,A}{96\,a^3\,c^5}+\frac {B\,35{}\mathrm {i}}{384\,a^3\,c^5}\right )+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (-\frac {77\,B}{320\,a^3\,c^5}+\frac {A\,77{}\mathrm {i}}{80\,a^3\,c^5}\right )-{\mathrm {tan}\left (e+f\,x\right )}^3\,\left (\frac {49\,A}{480\,a^3\,c^5}+\frac {B\,49{}\mathrm {i}}{1920\,a^3\,c^5}\right )-\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {61\,A}{160\,a^3\,c^5}+\frac {B\,61{}\mathrm {i}}{640\,a^3\,c^5}\right )+\frac {A\,1{}\mathrm {i}}{5\,a^3\,c^5}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^8+{\mathrm {tan}\left (e+f\,x\right )}^7\,2{}\mathrm {i}+2\,{\mathrm {tan}\left (e+f\,x\right )}^6+{\mathrm {tan}\left (e+f\,x\right )}^5\,6{}\mathrm {i}+{\mathrm {tan}\left (e+f\,x\right )}^3\,6{}\mathrm {i}-2\,{\mathrm {tan}\left (e+f\,x\right )}^2+\mathrm {tan}\left (e+f\,x\right )\,2{}\mathrm {i}-1\right )}+\frac {7\,x\,\left (4\,A+B\,1{}\mathrm {i}\right )}{128\,a^3\,c^5} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 1.97, size = 649, normalized size = 2.26 \[ \begin {cases} \frac {\left (- 7263405479023135948800 i A a^{21} c^{35} f^{7} e^{14 i e} e^{2 i f x} + \left (34587645138205409280 i A a^{21} c^{35} f^{7} e^{6 i e} - 34587645138205409280 B a^{21} c^{35} f^{7} e^{6 i e}\right ) e^{- 6 i f x} + \left (415051741658464911360 i A a^{21} c^{35} f^{7} e^{8 i e} - 311288806243848683520 B a^{21} c^{35} f^{7} e^{8 i e}\right ) e^{- 4 i f x} + \left (2905362191609254379520 i A a^{21} c^{35} f^{7} e^{10 i e} - 1452681095804627189760 B a^{21} c^{35} f^{7} e^{10 i e}\right ) e^{- 2 i f x} + \left (- 2905362191609254379520 i A a^{21} c^{35} f^{7} e^{16 i e} - 726340547902313594880 B a^{21} c^{35} f^{7} e^{16 i e}\right ) e^{4 i f x} + \left (- 968454063869751459840 i A a^{21} c^{35} f^{7} e^{18 i e} - 484227031934875729920 B a^{21} c^{35} f^{7} e^{18 i e}\right ) e^{6 i f x} + \left (- 207525870829232455680 i A a^{21} c^{35} f^{7} e^{20 i e} - 155644403121924341760 B a^{21} c^{35} f^{7} e^{20 i e}\right ) e^{8 i f x} + \left (- 20752587082923245568 i A a^{21} c^{35} f^{7} e^{22 i e} - 20752587082923245568 B a^{21} c^{35} f^{7} e^{22 i e}\right ) e^{10 i f x}\right ) e^{- 12 i e}}{53126622932283508654080 a^{24} c^{40} f^{8}} & \text {for}\: 53126622932283508654080 a^{24} c^{40} f^{8} e^{12 i e} \neq 0 \\x \left (- \frac {28 A + 7 i B}{128 a^{3} c^{5}} + \frac {\left (A e^{16 i e} + 8 A e^{14 i e} + 28 A e^{12 i e} + 56 A e^{10 i e} + 70 A e^{8 i e} + 56 A e^{6 i e} + 28 A e^{4 i e} + 8 A e^{2 i e} + A - i B e^{16 i e} - 6 i B e^{14 i e} - 14 i B e^{12 i e} - 14 i B e^{10 i e} + 14 i B e^{6 i e} + 14 i B e^{4 i e} + 6 i B e^{2 i e} + i B\right ) e^{- 6 i e}}{256 a^{3} c^{5}}\right ) & \text {otherwise} \end {cases} - \frac {x \left (- 28 A - 7 i B\right )}{128 a^{3} c^{5}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________